package com.wsh.mapper.generator;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wsh.entity.generator.TableColumnInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component("tableColumnInfoDao")
public interface TableColumnInfoDao extends BaseMapper<TableColumnInfoEntity> {

    void updateColumnName(TableColumnInfoEntity entity);

    String queryColumnLength(TableColumnInfoEntity entity);

    void updateColumnComment(TableColumnInfoEntity entity);

    Integer queryCountTable(@Param("tableName") String tableName);

    String queryColumnType(TableColumnInfoEntity entity);

    List<TableColumnInfoEntity> columnList(@Param("tableName") String tableName);

    void addTableColumn(@Param("list") List<TableColumnInfoEntity> list, @Param("tableName") String tableName);
}
